const {DataTypes} = require('sequelize')

const sequelize = require('../dbConnect')

const Student = sequelize.define('Student', {
        // 在这里定义模型属性
        name: {
            type: DataTypes.STRING,
            allowNull: false
        },
        birthday: {
            type: DataTypes.STRING,
            allowNull: false
        },
        sex: {
            type: DataTypes.BOOLEAN,
            allowNull: false
        },
        phone: {
            type: DataTypes.STRING,
            allowNull: false
        },
    },
    // 配置文件
    {
        freezeTableName: true,
        createdAt: false,
        updatedAt: false,
        paranoid: true,//不会进行真正的删除
    });

module.exports = Student